﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Command;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_XacDinhSanPhanHoanThanh : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("C1DockingTab1")]
        private C1DockingTab _C1DockingTab1;
        [AccessedThroughProperty("C1DockingTabPage1")]
        private C1DockingTabPage _C1DockingTabPage1;
        [AccessedThroughProperty("CmdBoGhiSo")]
        private Button _CmdBoGhiSo;
        [AccessedThroughProperty("CmdExit")]
        private Button _CmdExit;
        [AccessedThroughProperty("CmdGhiSo")]
        private Button _CmdGhiSo;
        [AccessedThroughProperty("CmdRefesh")]
        private Button _CmdRefesh;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("VSList")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSList;
        private string cFrmFormat;
        private string cFrmKhoaChungTuHoanThanh;
        private string cFrmNamThang;
        private string cFrmNgayChungTu;
        private string cFrmSoChungTu;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private clsSanPhamHoanThanh objHT;
        private clsDMTaiKhoan objTK;

        public Frm_XacDinhSanPhanHoanThanh()
        {
            base.Load += new EventHandler(this.Frm_SanPhamDoDang_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.cFrmNamThang = "";
            this.cFrmFormat = "";
            this.objTK = new clsDMTaiKhoan();
            this.objHT = new clsSanPhamHoanThanh();
            this.InitializeComponent();
        }

        private void CmdBoGhiSo_Click(object sender, EventArgs e)
        {
            if (LVYModule.ConfirmDelete(""))
            {
                clsSanPhamHoanThanh objHT = this.objHT;
                objHT.NamThang = this.cFrmNamThang;
                objHT.KhoaDonVi = modGeneral.H_CLIENT;
                if (objHT.GhiSo(this.cFrmKhoaChungTuHoanThanh, this.cFrmSoChungTu, LVYModule.Date2Char(this.cFrmNgayChungTu), "-"))
                {
                    objHT = null;
                    this.VSList.Rows.Count = 1;
                    this.CmdGhiSo.Enabled = true;
                    this.CmdBoGhiSo.Enabled = false;
                }
            }
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdGhiSo_Click(object sender, EventArgs e)
        {
            if (Conversions.ToBoolean(Microsoft.VisualBasic.CompilerServices.Operators.NotObject(this.SaveTemp())))
            {
                this.objHT.ClearTemp(this.cFrmNamThang);
            }
            else if (!this.UpdateData())
            {
                this.objHT.ClearTemp(this.cFrmNamThang);
            }
            else
            {
                this.objHT.ClearTemp(this.cFrmNamThang);
                this.CmdGhiSo.Enabled = false;
                this.CmdBoGhiSo.Enabled = true;
            }
        }

        private void CmdRefesh_Click(object sender, EventArgs e)
        {
            if (this.objHT.Exists(this.cFrmNamThang))
            {
                this.ShowData();
                this.CmdGhiSo.Enabled = false;
                this.CmdBoGhiSo.Enabled = true;
            }
            else
            {
                this.GetSanPhamDoDang();
                this.CmdGhiSo.Enabled = true;
                this.CmdBoGhiSo.Enabled = false;
            }
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing && (this.components != null))
                {
                    this.components.Dispose();
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }

        private void Frm_SanPhamDoDang_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                if (LVYModule.ReturnIfNull(this.cFrmNamThang, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    this.cFrmNamThang = SearchModule.GetNamThang("");
                }
                if (LVYModule.ReturnIfNull(this.cFrmNamThang, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    this.Dispose();
                }
                else
                {
                    this.cFrmFormat = modGeneral.H_FORMATNUMBER;
                    clsSanPhamHoanThanh objHT = this.objHT;
                    objHT.NamThang = this.cFrmNamThang;
                    objHT.KhoaDonVi = modGeneral.H_CLIENT;
                    objHT = null;
                    this.cFrmKhoaChungTuHoanThanh = modGeneral.H_PREFIX + "HT" + LVYModule.sRight("000000000000000" + this.cFrmNamThang, 11);
                    this.cFrmSoChungTu = "HT-" + this.cFrmNamThang;
                    this.cFrmNgayChungTu = Conversions.ToString(DateTime.DaysInMonth(Conversions.ToInteger(LVYModule.sLeft(this.cFrmNamThang, 4)), Conversions.ToInteger(LVYModule.sRight(this.cFrmNamThang, 2)))) + "/" + LVYModule.sRight(this.cFrmNamThang, 2) + "/" + LVYModule.sLeft(this.cFrmNamThang, 4);
                    if (this.objHT.Exists(this.cFrmNamThang))
                    {
                        this.ShowData();
                        this.CmdGhiSo.Enabled = false;
                        this.CmdBoGhiSo.Enabled = true;
                    }
                    else
                    {
                        this.GetSanPhamDoDang();
                        this.CmdGhiSo.Enabled = true;
                        this.CmdBoGhiSo.Enabled = false;
                    }
                }
            }
        }

        public void GetSanPhamDoDang()
        {
            double num2 = 0.0;
            DataTable sanPhamDoDang = this.objHT.GetSanPhamDoDang();
            this.VSList.Rows.Count = 1;
            string taiKhoan = this.objTK.GetTaiKhoan("632");
            this.objTK.Load(taiKhoan);
            C1.Win.C1FlexGrid.C1FlexGrid vSList = this.VSList;
            int num3 = sanPhamDoDang.Rows.Count - 1;
            for (int i = 0; i <= num3; i++)
            {
                num2 = ((Conversion.Val(RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["SoDuNoDauKy"])) - Conversion.Val(RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["SoDuCoDauKy"]))) + Conversion.Val(RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["SoPhatSinhNo"]))) - Conversion.Val(RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["SoPhatSinhCo"]));
                if (num2 > 0.0)
                {
                    vSList.AddItem("");
                    vSList[vSList.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["KhoaTaiKhoan"]);
                    vSList[vSList.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["SoTaiKhoan"]);
                    vSList[vSList.Rows.Count - 1, 2] = this.objTK.Khoa;
                    vSList[vSList.Rows.Count - 1, 3] = this.objTK.SoTaiKhoan;
                    vSList[vSList.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["KhoaBoPhan"]);
                    vSList[vSList.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["BoPhan"]);
                    vSList[vSList.Rows.Count - 1, 6] = RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["KhoaSanPham"]);
                    vSList[vSList.Rows.Count - 1, 7] = RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["SanPham"]);
                    vSList[vSList.Rows.Count - 1, 8] = RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["KhoaHopDong"]);
                    vSList[vSList.Rows.Count - 1, 9] = RuntimeHelpers.GetObjectValue(sanPhamDoDang.Rows[i]["HopDong"]);
                    vSList[vSList.Rows.Count - 1, 10] = num2;
                    vSList[vSList.Rows.Count - 1, 11] = 0;
                    vSList[vSList.Rows.Count - 1, 12] = 0;
                    vSList[vSList.Rows.Count - 1, 13] = "Sản phẩm ho\x00e0n th\x00e0nh th\x00e1ng " + LVYModule.sRight(this.cFrmNamThang, 2) + "/" + LVYModule.sLeft(this.cFrmNamThang, 4);
                }
            }
            vSList = null;
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_XacDinhSanPhanHoanThanh));
            this.VSList = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.Panel1 = new Panel();
            this.CmdRefesh = new Button();
            this.CmdExit = new Button();
            this.CmdBoGhiSo = new Button();
            this.CmdGhiSo = new Button();
            this.C1DockingTab1 = new C1DockingTab();
            this.C1DockingTabPage1 = new C1DockingTabPage();
            this.VSList.BeginInit();
            this.Panel1.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab1).BeginInit();
            this.C1DockingTab1.SuspendLayout();
            this.C1DockingTabPage1.SuspendLayout();
            this.SuspendLayout();
            this.VSList.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.Light3D;
            this.VSList.ColumnInfo = manager.GetString("VSList.ColumnInfo");
            this.VSList.Cursor = Cursors.Default;
            this.VSList.Dock = DockStyle.Fill;
            this.VSList.ExtendLastCol = true;
            this.VSList.KeyActionEnter = KeyActionEnum.MoveAcross;
            Point point = new Point(0, 0);
            this.VSList.Location = point;
            this.VSList.Name = "VSList";
            this.VSList.Rows.Count = 1;
            this.VSList.Rows.DefaultSize = 0x11;
            this.VSList.Rows.MinSize = 0x12;
            Size size = new Size(0x3e0, 0x233);
            this.VSList.Size = size;
            this.VSList.StyleInfo = manager.GetString("VSList.StyleInfo");
            this.VSList.TabIndex = 0x5d;
            this.VSList.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel1.Controls.Add(this.CmdRefesh);
            this.Panel1.Controls.Add(this.CmdExit);
            this.Panel1.Controls.Add(this.CmdBoGhiSo);
            this.Panel1.Controls.Add(this.CmdGhiSo);
            this.Panel1.Dock = DockStyle.Bottom;
            point = new Point(0, 0x24d);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            size = new Size(0x3e2, 0x20);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 15;
            point = new Point(0x24b, 3);
            this.CmdRefesh.Location = point;
            this.CmdRefesh.Name = "CmdRefesh";
            size = new Size(0x5f, 0x19);
            this.CmdRefesh.Size = size;
            this.CmdRefesh.TabIndex = 0x13;
            this.CmdRefesh.Text = "&Refresh";
            this.CmdRefesh.UseVisualStyleBackColor = true;
            point = new Point(0x37b, 3);
            this.CmdExit.Location = point;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x5f, 0x19);
            this.CmdExit.Size = size;
            this.CmdExit.TabIndex = 0x12;
            this.CmdExit.Text = "&Tho\x00e1t";
            this.CmdExit.UseVisualStyleBackColor = true;
            point = new Point(0x315, 3);
            this.CmdBoGhiSo.Location = point;
            this.CmdBoGhiSo.Name = "CmdBoGhiSo";
            size = new Size(0x5f, 0x19);
            this.CmdBoGhiSo.Size = size;
            this.CmdBoGhiSo.TabIndex = 0x11;
            this.CmdBoGhiSo.Text = "&Hủy ghi sổ";
            this.CmdBoGhiSo.UseVisualStyleBackColor = true;
            point = new Point(0x2b0, 3);
            this.CmdGhiSo.Location = point;
            this.CmdGhiSo.Name = "CmdGhiSo";
            size = new Size(0x5f, 0x19);
            this.CmdGhiSo.Size = size;
            this.CmdGhiSo.TabIndex = 0x10;
            this.CmdGhiSo.Text = "&Ghi sổ";
            this.CmdGhiSo.UseVisualStyleBackColor = true;
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage1);
            this.C1DockingTab1.Dock = DockStyle.Fill;
            point = new Point(0, 0);
            this.C1DockingTab1.Location = point;
            this.C1DockingTab1.Name = "C1DockingTab1";
            size = new Size(0x3e2, 0x24d);
            this.C1DockingTab1.Size = size;
            this.C1DockingTab1.TabIndex = 0x10;
            this.C1DockingTab1.TabsSpacing = 5;
            this.C1DockingTab1.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage1.Controls.Add(this.VSList);
            this.C1DockingTabPage1.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage1.Location = point;
            this.C1DockingTabPage1.Name = "C1DockingTabPage1";
            size = new Size(0x3e0, 0x233);
            this.C1DockingTabPage1.Size = size;
            this.C1DockingTabPage1.TabIndex = 0;
            this.C1DockingTabPage1.Text = "Danh s\x00e1ch sản phẩm dở dang";
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x3e2, 0x26d);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.C1DockingTab1);
            this.Controls.Add(this.Panel1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_XacDinhSanPhanHoanThanh";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "TH-0015";
            this.Text = "XAC DINH SAN PHAM HOAN THANH";
            this.VSList.EndInit();
            this.Panel1.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab1).EndInit();
            this.C1DockingTab1.ResumeLayout(false);
            this.C1DockingTabPage1.ResumeLayout(false);
            this.ResumeLayout(false);
        }

        public object SaveTemp()
        {
            C1.Win.C1FlexGrid.C1FlexGrid vSList = this.VSList;
            int num2 = vSList.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                this.objHT.NamThang = this.cFrmNamThang;
                this.objHT.KhoaDonVi = modGeneral.H_CLIENT;
                this.objHT.KhoaTaiKhoanNo = Conversions.ToString(vSList[i, 2]);
                this.objHT.KhoaTaiKhoanCo = Conversions.ToString(vSList[i, 0]);
                this.objHT.KhoaBoPhan = Conversions.ToString(vSList[i, 4]);
                this.objHT.KhoaSanPham = Conversions.ToString(vSList[i, 6]);
                this.objHT.KhoaHopDong = Conversions.ToString(vSList[i, 8]);
                this.objHT.SoDuBanDau = Conversion.Val(RuntimeHelpers.GetObjectValue(vSList[i, 10]));
                this.objHT.TyLeHoanThanh = Conversion.Val(RuntimeHelpers.GetObjectValue(vSList[i, 11]));
                this.objHT.SoKetChuyen = Conversion.Val(RuntimeHelpers.GetObjectValue(vSList[i, 12]));
                this.objHT.DienGiai = Conversions.ToString(vSList[i, 13]);
                if (!this.objHT.Save())
                {
                    return false;
                }
            }
            vSList = null;
            return true;
        }

        public void ShowData()
        {
            DataTable sanPhamHoanThanh = this.objHT.GetSanPhamHoanThanh(this.cFrmNamThang);
            C1.Win.C1FlexGrid.C1FlexGrid vSList = this.VSList;
            vSList.Rows.Count = 1;
            int num2 = sanPhamHoanThanh.Rows.Count - 1;
            for (int i = 0; i <= num2; i++)
            {
                vSList.AddItem("");
                vSList[vSList.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["KhoaTaiKhoanCo"]);
                vSList[vSList.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["TaiKhoanCo"]);
                vSList[vSList.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["KhoaTaiKhoanNo"]);
                vSList[vSList.Rows.Count - 1, 3] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["TaiKhoanNo"]);
                vSList[vSList.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["KhoaBoPhan"]);
                vSList[vSList.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["BoPhan"]);
                vSList[vSList.Rows.Count - 1, 6] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["KhoaSanPham"]);
                vSList[vSList.Rows.Count - 1, 7] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["SanPham"]);
                vSList[vSList.Rows.Count - 1, 8] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["KhoaHopDong"]);
                vSList[vSList.Rows.Count - 1, 9] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["HopDong"]);
                vSList[vSList.Rows.Count - 1, 10] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["SoDuBanDau"]);
                vSList[vSList.Rows.Count - 1, 11] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["TyLeHoanThanh"]);
                vSList[vSList.Rows.Count - 1, 12] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["SoKetChuyen"]);
                vSList[vSList.Rows.Count - 1, 13] = RuntimeHelpers.GetObjectValue(sanPhamHoanThanh.Rows[i]["DienGiai"]);
            }
            vSList = null;
        }

        public bool UpdateData()
        {
            bool flag=false;
            clsSanPhamHoanThanh objHT = this.objHT;
            objHT.NamThang = this.cFrmNamThang;
            objHT.KhoaDonVi = modGeneral.H_CLIENT;
            return objHT.GhiSo(this.cFrmKhoaChungTuHoanThanh, this.cFrmSoChungTu, LVYModule.Date2Char(this.cFrmNgayChungTu), "+");
            objHT = null;
            return flag;
        }

        private void VSList_AfterEdit(object sender, RowColEventArgs e)
        {
            if (e.Col == 11)
            {
                double num2 = Conversion.Val(RuntimeHelpers.GetObjectValue(this.VSList[e.Row, 11]));
                double num = Conversion.Val(RuntimeHelpers.GetObjectValue(this.VSList[e.Row, 10]));
                this.VSList[e.Row, 12] = Math.Round((double) ((num * num2) / 100.0), 0);
            }
        }

        private void VSList_BeforeEdit(object sender, RowColEventArgs e)
        {
            if (e.Col < 11)
            {
                e.Cancel = true;
            }
        }

        internal virtual C1DockingTab C1DockingTab1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage1 = value;
            }
        }

        internal virtual Button CmdBoGhiSo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdBoGhiSo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdBoGhiSo_Click);
                if (this._CmdBoGhiSo != null)
                {
                    this._CmdBoGhiSo.Click -= handler;
                }
                this._CmdBoGhiSo = value;
                if (this._CmdBoGhiSo != null)
                {
                    this._CmdBoGhiSo.Click += handler;
                }
            }
        }

        internal virtual Button CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual Button CmdGhiSo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdGhiSo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdGhiSo_Click);
                if (this._CmdGhiSo != null)
                {
                    this._CmdGhiSo.Click -= handler;
                }
                this._CmdGhiSo = value;
                if (this._CmdGhiSo != null)
                {
                    this._CmdGhiSo.Click += handler;
                }
            }
        }

        internal virtual Button CmdRefesh
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdRefesh;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdRefesh_Click);
                if (this._CmdRefesh != null)
                {
                    this._CmdRefesh.Click -= handler;
                }
                this._CmdRefesh = value;
                if (this._CmdRefesh != null)
                {
                    this._CmdRefesh.Click += handler;
                }
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSList
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSList;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                RowColEventHandler handler = new RowColEventHandler(this.VSList_BeforeEdit);
                RowColEventHandler handler2 = new RowColEventHandler(this.VSList_AfterEdit);
                if (this._VSList != null)
                {
                    this._VSList.BeforeEdit -= handler;
                    this._VSList.AfterEdit -= handler2;
                }
                this._VSList = value;
                if (this._VSList != null)
                {
                    this._VSList.BeforeEdit += handler;
                    this._VSList.AfterEdit += handler2;
                }
            }
        }
    }
}

